package com.jch.dm.chapter_16_mediator;

import java.awt.*;

/**
 * @author: Administrator
 * @create: 2020/04/07 14:19
 **/
public class ColleagueButton extends Button implements Colleague {

    /**
     * 仲裁者
     */
    private Mediator mediator;

    public ColleagueButton(String caption) throws HeadlessException {
        super(caption);
    }

    /**
     * 设置仲裁者
     *
     * @param mediator 仲裁者
     */
    @Override
    public void setMediator(Mediator mediator) {
        this.mediator = mediator;
    }

    /**
     * 设置禁用启用
     *
     * @param enabled
     */
    @Override
    public void setColleagueEnabled(boolean enabled) {
        setEnabled(enabled);
    }
}
